<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>添加你要发布的信息</title>
		<link rel="stylesheet" type="text/css" th:href="@{/css/common_samplify.css}" />
		<script th:src="@{/js/jquery-3.2.1.min.js}" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			form{
				padding: 10px;
				background: snow;

			}
			form input{
				border: 1px solid #CCCCCC;
				height: 40px;
			}
			form>div{
				
				margin-top: 10px;
				margin-bottom: 0px;
			}
			form textarea{
				height: 100px;
			}
		</style>
		<script>
			function checkForm(e){
				var oTitle=$("#title").val();
				var oContent=$("#content").val();
				if(!$.trim(oTitle)||!$.trim(oContent)){
					alert("发布的类型或者内容不能为空！")
					return false;
				}
				return true;
			}
		</script>
	</head>
	<body>
		<form class="width100" th:action="@{/buyer/convenientInfo/save}" th:object="${convenientInfoForm}" enctype="multipart/form-data" method="post" onsubmit="return checkForm(this)">
			<div for="" class="width100">发布类型：</div>
			<input class="width100" type="text" id="title"  th:name="convenientType" placeholder="例如：招聘，寻人启示等" />
			<div class="width100" for="">主体内容：</div>
			<textarea class="width100" th:name="convenientDescrition" id="content" rows="" cols="" placeholder="请输入您要发布的内容"></textarea>
			<div class=""  for="">添加图片：</div>
			<input class="width100" type="file"  name="file" multiple=""/>
			<input class="width100" style="margin-top: 10px;background: #4CAF50;" type="submit" value="确定"/>
		</form>
		<div class="position_fix bottom0 bt row width100 bg_snow">
			<div class="col-4 text_center">
				<a th:href="@{/buyer/bussiness/allBussiness(flag=recommend)}" class="textdecoration_none color666">首页</a>
			</div>
			<div class="col-4 text_center">
				<a th:href="@{/personalInfo(openid=${session.openid})}" class="text_center color666 textdecoration_none">个人中心</a>
			</div>
			<div class="col-4 text_center">
				<a th:href="@{/couponCenter(openid=${session.openid})}" class="textdecoration_none color666">优惠券</a>
			</div>
		</div>
	</body>
</html>
